package Demo1299.Demo25;

import java.io.FileReader;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.Properties;

public class Demo1 {
    public static void main(String[] args) throws Exception {
        Properties prop = new Properties();
        FileReader in = new FileReader("C:\\Daymate\\src\\Demo1299\\Demo25\\Properties.Properties");
        prop.load(in);
        in.close();
        for (Map.Entry<Object, Object> p : prop.entrySet()) {
            Class<?> aClass = Class.forName((String) p.getValue());
            Object c = aClass.getDeclaredConstructor().newInstance();
            Method run = aClass.getDeclaredMethod("run");
            run.invoke(c);
        }
    }
}
